3.3.46 \(\int \frac {1}{(a+b \tan ^2(e+f x))^3} \, dx\) [246]
Optimal. Leaf size=150 \[ \frac {x}{(a-b)^3}-\frac {\sqrt {b} \left (15 a^2-10 a b+3 b^2\right ) \text {ArcTan}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{8 a^{5/2} (a-b)^3 f}-\frac {b \tan (e+f x)}{4 a (a-b) f \left (a+b \tan ^2(e+f x)\right )^2}-\frac {(7 a-3 b) b \tan (e+f x)}{8 a^2 (a-b)^2 f \left (a+b \tan ^2(e+f x)\right )} \]
[Out]
x/(a-b)^3-1/8*(15*a^2-10*a*b+3*b^2)*arctan(b^(1/2)*tan(f*x+e)/a^(1/2))*b^(1/2)/a^(5/2)/(a-b)^3/f-1/4*b*tan(f*x
+e)/a/(a-b)/f/(a+b*tan(f*x+e)^2)^2-1/8*(7*a-3*b)*b*tan(f*x+e)/a^2/(a-b)^2/f/(a+b*tan(f*x+e)^2)
________________________________________________________________________________________
Rubi [A]
time = 0.11, antiderivative size = 150, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {3742, 425, 541,
536, 209, 211} \begin {gather*} -\frac {b (7 a-3 b) \tan (e+f x)}{8 a^2 f (a-b)^2 \left (a+b \tan ^2(e+f x)\right )}-\frac {\sqrt {b} \left (15 a^2-10 a b+3 b^2\right ) \text {ArcTan}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{8 a^{5/2} f (a-b)^3}-\frac {b \tan (e+f x)}{4 a f (a-b) \left (a+b \tan ^2(e+f x)\right )^2}+\frac {x}{(a-b)^3} \end {gather*}
Antiderivative was successfully verified.
[In]
Int[(a + b*Tan[e + f*x]^2)^(-3),x]
[Out]
x/(a - b)^3 - (Sqrt[b]*(15*a^2 - 10*a*b + 3*b^2)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a]])/(8*a^(5/2)*(a - b)^3*
f) - (b*Tan[e + f*x])/(4*a*(a - b)*f*(a + b*Tan[e + f*x]^2)^2) - ((7*a - 3*b)*b*Tan[e + f*x])/(8*a^2*(a - b)^2
*f*(a + b*Tan[e + f*x]^2))
Rule 209
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])
Rule 211
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]
Rule 425
Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[(-b)*x*(a + b*x^n)^(p + 1)*
((c + d*x^n)^(q + 1)/(a*n*(p + 1)*(b*c - a*d))), x] + Dist[1/(a*n*(p + 1)*(b*c - a*d)), Int[(a + b*x^n)^(p + 1
)*(c + d*x^n)^q*Simp[b*c + n*(p + 1)*(b*c - a*d) + d*b*(n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c,
d, n, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && !( !IntegerQ[p] && IntegerQ[q] && LtQ[q, -1]) && IntBinomi
alQ[a, b, c, d, n, p, q, x]
Rule 536
Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[(b*e - a*f
)/(b*c - a*d), Int[1/(a + b*x^n), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a
, b, c, d, e, f, n}, x]
Rule 541
Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)), x_Symbol] :> Simp[(
-(b*e - a*f))*x*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(a*n*(b*c - a*d)*(p + 1))), x] + Dist[1/(a*n*(b*c - a
*d)*(p + 1)), Int[(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*(b*e - a*f) + e*n*(b*c - a*d)*(p + 1) + d*(b*e - a*
f)*(n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, n, q}, x] && LtQ[p, -1]
Rule 3742
Int[((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x]
, x]}, Dist[c*(ff/f), Subst[Int[(a + b*(ff*x)^n)^p/(c^2 + ff^2*x^2), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ
[{a, b, c, e, f, n, p}, x] && (IntegersQ[n, p] || IGtQ[p, 0] || EqQ[n^2, 4] || EqQ[n^2, 16])
Rubi steps
\begin {align*} \int \frac {1}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx &=\frac {\text {Subst}\left (\int \frac {1}{\left (1+x^2\right ) \left (a+b x^2\right )^3} \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac {b \tan (e+f x)}{4 a (a-b) f \left (a+b \tan ^2(e+f x)\right )^2}+\frac {\text {Subst}\left (\int \frac {4 a-3 b-3 b x^2}{\left (1+x^2\right ) \left (a+b x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{4 a (a-b) f}\\ &=-\frac {b \tan (e+f x)}{4 a (a-b) f \left (a+b \tan ^2(e+f x)\right )^2}-\frac {(7 a-3 b) b \tan (e+f x)}{8 a^2 (a-b)^2 f \left (a+b \tan ^2(e+f x)\right )}+\frac {\text {Subst}\left (\int \frac {8 a^2-7 a b+3 b^2-(7 a-3 b) b x^2}{\left (1+x^2\right ) \left (a+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{8 a^2 (a-b)^2 f}\\ &=-\frac {b \tan (e+f x)}{4 a (a-b) f \left (a+b \tan ^2(e+f x)\right )^2}-\frac {(7 a-3 b) b \tan (e+f x)}{8 a^2 (a-b)^2 f \left (a+b \tan ^2(e+f x)\right )}+\frac {\text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{(a-b)^3 f}-\frac {\left (b \left (15 a^2-10 a b+3 b^2\right )\right ) \text {Subst}\left (\int \frac {1}{a+b x^2} \, dx,x,\tan (e+f x)\right )}{8 a^2 (a-b)^3 f}\\ &=\frac {x}{(a-b)^3}-\frac {\sqrt {b} \left (15 a^2-10 a b+3 b^2\right ) \tan ^{-1}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{8 a^{5/2} (a-b)^3 f}-\frac {b \tan (e+f x)}{4 a (a-b) f \left (a+b \tan ^2(e+f x)\right )^2}-\frac {(7 a-3 b) b \tan (e+f x)}{8 a^2 (a-b)^2 f \left (a+b \tan ^2(e+f x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.32, size = 138, normalized size = 0.92 \begin {gather*} -\frac {-8 \text {ArcTan}(\tan (e+f x))+\frac {\sqrt {b} \left (15 a^2-10 a b+3 b^2\right ) \text {ArcTan}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{a^{5/2}}+\frac {2 (a-b)^2 b \tan (e+f x)}{a \left (a+b \tan ^2(e+f x)\right )^2}+\frac {(7 a-3 b) (a-b) b \tan (e+f x)}{a^2 \left (a+b \tan ^2(e+f x)\right )}}{8 (a-b)^3 f} \end {gather*}
Antiderivative was successfully verified.
[In]
Integrate[(a + b*Tan[e + f*x]^2)^(-3),x]
[Out]
-1/8*(-8*ArcTan[Tan[e + f*x]] + (Sqrt[b]*(15*a^2 - 10*a*b + 3*b^2)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a]])/a^(
5/2) + (2*(a - b)^2*b*Tan[e + f*x])/(a*(a + b*Tan[e + f*x]^2)^2) + ((7*a - 3*b)*(a - b)*b*Tan[e + f*x])/(a^2*(
a + b*Tan[e + f*x]^2)))/((a - b)^3*f)
________________________________________________________________________________________
Maple [A]
time = 0.08, size = 142, normalized size = 0.95
| | |
method |
result |
size |
| | |
derivativedivides |
\(\frac {\frac {\arctan \left (\tan \left (f x +e \right )\right )}{\left (a -b \right )^{3}}-\frac {b \left (\frac {\frac {b \left (7 a^{2}-10 a b +3 b^{2}\right ) \left (\tan ^{3}\left (f x +e \right )\right )}{8 a^{2}}+\frac {\left (9 a^{2}-14 a b +5 b^{2}\right ) \tan \left (f x +e \right )}{8 a}}{\left (a +b \left (\tan ^{2}\left (f x +e \right )\right )\right )^{2}}+\frac {\left (15 a^{2}-10 a b +3 b^{2}\right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {a b}}\right )}{8 a^{2} \sqrt {a b}}\right )}{\left (a -b \right )^{3}}}{f}\) |
\(142\) |
default |
\(\frac {\frac {\arctan \left (\tan \left (f x +e \right )\right )}{\left (a -b \right )^{3}}-\frac {b \left (\frac {\frac {b \left (7 a^{2}-10 a b +3 b^{2}\right ) \left (\tan ^{3}\left (f x +e \right )\right )}{8 a^{2}}+\frac {\left (9 a^{2}-14 a b +5 b^{2}\right ) \tan \left (f x +e \right )}{8 a}}{\left (a +b \left (\tan ^{2}\left (f x +e \right )\right )\right )^{2}}+\frac {\left (15 a^{2}-10 a b +3 b^{2}\right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {a b}}\right )}{8 a^{2} \sqrt {a b}}\right )}{\left (a -b \right )^{3}}}{f}\) |
\(142\) |
risch |
\(\frac {x}{a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}}+\frac {i \left (9 a^{3} {\mathrm e}^{6 i \left (f x +e \right )}+a^{2} b \,{\mathrm e}^{6 i \left (f x +e \right )}-13 a \,b^{2} {\mathrm e}^{6 i \left (f x +e \right )}+3 b^{3} {\mathrm e}^{6 i \left (f x +e \right )}+27 a^{3} {\mathrm e}^{4 i \left (f x +e \right )}+9 a^{2} b \,{\mathrm e}^{4 i \left (f x +e \right )}+21 a \,b^{2} {\mathrm e}^{4 i \left (f x +e \right )}-9 b^{3} {\mathrm e}^{4 i \left (f x +e \right )}+27 a^{3} {\mathrm e}^{2 i \left (f x +e \right )}-13 a^{2} b \,{\mathrm e}^{2 i \left (f x +e \right )}-23 a \,b^{2} {\mathrm e}^{2 i \left (f x +e \right )}+9 b^{3} {\mathrm e}^{2 i \left (f x +e \right )}+9 a^{3}-21 a^{2} b +15 a \,b^{2}-3 b^{3}\right ) b}{4 \left (-a \,{\mathrm e}^{4 i \left (f x +e \right )}+b \,{\mathrm e}^{4 i \left (f x +e \right )}-2 a \,{\mathrm e}^{2 i \left (f x +e \right )}-2 b \,{\mathrm e}^{2 i \left (f x +e \right )}-a +b \right )^{2} f \,a^{2} \left (-a +b \right )^{3}}+\frac {15 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-a b}+a +b}{a -b}\right )}{16 a \left (a -b \right )^{3} f}-\frac {5 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-a b}+a +b}{a -b}\right ) b}{8 a^{2} \left (a -b \right )^{3} f}+\frac {3 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-a b}+a +b}{a -b}\right ) b^{2}}{16 a^{3} \left (a -b \right )^{3} f}-\frac {15 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-a b}-a -b}{a -b}\right )}{16 a \left (a -b \right )^{3} f}+\frac {5 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-a b}-a -b}{a -b}\right ) b}{8 a^{2} \left (a -b \right )^{3} f}-\frac {3 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-a b}-a -b}{a -b}\right ) b^{2}}{16 a^{3} \left (a -b \right )^{3} f}\) |
\(629\) |
| | |
|
|
|
Verification of antiderivative is not currently implemented for this CAS.
[In]
int(1/(a+b*tan(f*x+e)^2)^3,x,method=_RETURNVERBOSE)
[Out]
1/f*(1/(a-b)^3*arctan(tan(f*x+e))-b/(a-b)^3*((1/8*b*(7*a^2-10*a*b+3*b^2)/a^2*tan(f*x+e)^3+1/8*(9*a^2-14*a*b+5*
b^2)/a*tan(f*x+e))/(a+b*tan(f*x+e)^2)^2+1/8*(15*a^2-10*a*b+3*b^2)/a^2/(a*b)^(1/2)*arctan(b*tan(f*x+e)/(a*b)^(1
/2))))
________________________________________________________________________________________
Maxima [A]
time = 0.50, size = 233, normalized size = 1.55 \begin {gather*} -\frac {\frac {{\left (15 \, a^{2} b - 10 \, a b^{2} + 3 \, b^{3}\right )} \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {a b}}\right )}{{\left (a^{5} - 3 \, a^{4} b + 3 \, a^{3} b^{2} - a^{2} b^{3}\right )} \sqrt {a b}} + \frac {{\left (7 \, a b^{2} - 3 \, b^{3}\right )} \tan \left (f x + e\right )^{3} + {\left (9 \, a^{2} b - 5 \, a b^{2}\right )} \tan \left (f x + e\right )}{a^{6} - 2 \, a^{5} b + a^{4} b^{2} + {\left (a^{4} b^{2} - 2 \, a^{3} b^{3} + a^{2} b^{4}\right )} \tan \left (f x + e\right )^{4} + 2 \, {\left (a^{5} b - 2 \, a^{4} b^{2} + a^{3} b^{3}\right )} \tan \left (f x + e\right )^{2}} - \frac {8 \, {\left (f x + e\right )}}{a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}}}{8 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(1/(a+b*tan(f*x+e)^2)^3,x, algorithm="maxima")
[Out]
-1/8*((15*a^2*b - 10*a*b^2 + 3*b^3)*arctan(b*tan(f*x + e)/sqrt(a*b))/((a^5 - 3*a^4*b + 3*a^3*b^2 - a^2*b^3)*sq
rt(a*b)) + ((7*a*b^2 - 3*b^3)*tan(f*x + e)^3 + (9*a^2*b - 5*a*b^2)*tan(f*x + e))/(a^6 - 2*a^5*b + a^4*b^2 + (a
^4*b^2 - 2*a^3*b^3 + a^2*b^4)*tan(f*x + e)^4 + 2*(a^5*b - 2*a^4*b^2 + a^3*b^3)*tan(f*x + e)^2) - 8*(f*x + e)/(
a^3 - 3*a^2*b + 3*a*b^2 - b^3))/f
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 351 vs.
\(2 (141) = 282\).
time = 4.66, size = 766, normalized size = 5.11 \begin {gather*} \left [\frac {32 \, a^{2} b^{2} f x \tan \left (f x + e\right )^{4} + 64 \, a^{3} b f x \tan \left (f x + e\right )^{2} + 32 \, a^{4} f x - 4 \, {\left (7 \, a^{2} b^{2} - 10 \, a b^{3} + 3 \, b^{4}\right )} \tan \left (f x + e\right )^{3} - {\left ({\left (15 \, a^{2} b^{2} - 10 \, a b^{3} + 3 \, b^{4}\right )} \tan \left (f x + e\right )^{4} + 15 \, a^{4} - 10 \, a^{3} b + 3 \, a^{2} b^{2} + 2 \, {\left (15 \, a^{3} b - 10 \, a^{2} b^{2} + 3 \, a b^{3}\right )} \tan \left (f x + e\right )^{2}\right )} \sqrt {-\frac {b}{a}} \log \left (\frac {b^{2} \tan \left (f x + e\right )^{4} - 6 \, a b \tan \left (f x + e\right )^{2} + a^{2} + 4 \, {\left (a b \tan \left (f x + e\right )^{3} - a^{2} \tan \left (f x + e\right )\right )} \sqrt {-\frac {b}{a}}}{b^{2} \tan \left (f x + e\right )^{4} + 2 \, a b \tan \left (f x + e\right )^{2} + a^{2}}\right ) - 4 \, {\left (9 \, a^{3} b - 14 \, a^{2} b^{2} + 5 \, a b^{3}\right )} \tan \left (f x + e\right )}{32 \, {\left ({\left (a^{5} b^{2} - 3 \, a^{4} b^{3} + 3 \, a^{3} b^{4} - a^{2} b^{5}\right )} f \tan \left (f x + e\right )^{4} + 2 \, {\left (a^{6} b - 3 \, a^{5} b^{2} + 3 \, a^{4} b^{3} - a^{3} b^{4}\right )} f \tan \left (f x + e\right )^{2} + {\left (a^{7} - 3 \, a^{6} b + 3 \, a^{5} b^{2} - a^{4} b^{3}\right )} f\right )}}, \frac {16 \, a^{2} b^{2} f x \tan \left (f x + e\right )^{4} + 32 \, a^{3} b f x \tan \left (f x + e\right )^{2} + 16 \, a^{4} f x - 2 \, {\left (7 \, a^{2} b^{2} - 10 \, a b^{3} + 3 \, b^{4}\right )} \tan \left (f x + e\right )^{3} - {\left ({\left (15 \, a^{2} b^{2} - 10 \, a b^{3} + 3 \, b^{4}\right )} \tan \left (f x + e\right )^{4} + 15 \, a^{4} - 10 \, a^{3} b + 3 \, a^{2} b^{2} + 2 \, {\left (15 \, a^{3} b - 10 \, a^{2} b^{2} + 3 \, a b^{3}\right )} \tan \left (f x + e\right )^{2}\right )} \sqrt {\frac {b}{a}} \arctan \left (\frac {{\left (b \tan \left (f x + e\right )^{2} - a\right )} \sqrt {\frac {b}{a}}}{2 \, b \tan \left (f x + e\right )}\right ) - 2 \, {\left (9 \, a^{3} b - 14 \, a^{2} b^{2} + 5 \, a b^{3}\right )} \tan \left (f x + e\right )}{16 \, {\left ({\left (a^{5} b^{2} - 3 \, a^{4} b^{3} + 3 \, a^{3} b^{4} - a^{2} b^{5}\right )} f \tan \left (f x + e\right )^{4} + 2 \, {\left (a^{6} b - 3 \, a^{5} b^{2} + 3 \, a^{4} b^{3} - a^{3} b^{4}\right )} f \tan \left (f x + e\right )^{2} + {\left (a^{7} - 3 \, a^{6} b + 3 \, a^{5} b^{2} - a^{4} b^{3}\right )} f\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(1/(a+b*tan(f*x+e)^2)^3,x, algorithm="fricas")
[Out]
[1/32*(32*a^2*b^2*f*x*tan(f*x + e)^4 + 64*a^3*b*f*x*tan(f*x + e)^2 + 32*a^4*f*x - 4*(7*a^2*b^2 - 10*a*b^3 + 3*
b^4)*tan(f*x + e)^3 - ((15*a^2*b^2 - 10*a*b^3 + 3*b^4)*tan(f*x + e)^4 + 15*a^4 - 10*a^3*b + 3*a^2*b^2 + 2*(15*
a^3*b - 10*a^2*b^2 + 3*a*b^3)*tan(f*x + e)^2)*sqrt(-b/a)*log((b^2*tan(f*x + e)^4 - 6*a*b*tan(f*x + e)^2 + a^2
+ 4*(a*b*tan(f*x + e)^3 - a^2*tan(f*x + e))*sqrt(-b/a))/(b^2*tan(f*x + e)^4 + 2*a*b*tan(f*x + e)^2 + a^2)) - 4
*(9*a^3*b - 14*a^2*b^2 + 5*a*b^3)*tan(f*x + e))/((a^5*b^2 - 3*a^4*b^3 + 3*a^3*b^4 - a^2*b^5)*f*tan(f*x + e)^4
+ 2*(a^6*b - 3*a^5*b^2 + 3*a^4*b^3 - a^3*b^4)*f*tan(f*x + e)^2 + (a^7 - 3*a^6*b + 3*a^5*b^2 - a^4*b^3)*f), 1/1
6*(16*a^2*b^2*f*x*tan(f*x + e)^4 + 32*a^3*b*f*x*tan(f*x + e)^2 + 16*a^4*f*x - 2*(7*a^2*b^2 - 10*a*b^3 + 3*b^4)
*tan(f*x + e)^3 - ((15*a^2*b^2 - 10*a*b^3 + 3*b^4)*tan(f*x + e)^4 + 15*a^4 - 10*a^3*b + 3*a^2*b^2 + 2*(15*a^3*
b - 10*a^2*b^2 + 3*a*b^3)*tan(f*x + e)^2)*sqrt(b/a)*arctan(1/2*(b*tan(f*x + e)^2 - a)*sqrt(b/a)/(b*tan(f*x + e
))) - 2*(9*a^3*b - 14*a^2*b^2 + 5*a*b^3)*tan(f*x + e))/((a^5*b^2 - 3*a^4*b^3 + 3*a^3*b^4 - a^2*b^5)*f*tan(f*x
+ e)^4 + 2*(a^6*b - 3*a^5*b^2 + 3*a^4*b^3 - a^3*b^4)*f*tan(f*x + e)^2 + (a^7 - 3*a^6*b + 3*a^5*b^2 - a^4*b^3)*
f)]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 8964 vs.
\(2 (133) = 266\).
time = 75.98, size = 8964, normalized size = 59.76 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(1/(a+b*tan(f*x+e)**2)**3,x)
[Out]
Piecewise((zoo*x/tan(e)**6, Eq(a, 0) & Eq(b, 0) & Eq(f, 0)), (x/a**3, Eq(b, 0)), ((-x - 1/(f*tan(e + f*x)) + 1
/(3*f*tan(e + f*x)**3) - 1/(5*f*tan(e + f*x)**5))/b**3, Eq(a, 0)), (15*f*x*tan(e + f*x)**6/(48*b**3*f*tan(e +
f*x)**6 + 144*b**3*f*tan(e + f*x)**4 + 144*b**3*f*tan(e + f*x)**2 + 48*b**3*f) + 45*f*x*tan(e + f*x)**4/(48*b*
*3*f*tan(e + f*x)**6 + 144*b**3*f*tan(e + f*x)**4 + 144*b**3*f*tan(e + f*x)**2 + 48*b**3*f) + 45*f*x*tan(e + f
*x)**2/(48*b**3*f*tan(e + f*x)**6 + 144*b**3*f*tan(e + f*x)**4 + 144*b**3*f*tan(e + f*x)**2 + 48*b**3*f) + 15*
f*x/(48*b**3*f*tan(e + f*x)**6 + 144*b**3*f*tan(e + f*x)**4 + 144*b**3*f*tan(e + f*x)**2 + 48*b**3*f) + 15*tan
(e + f*x)**5/(48*b**3*f*tan(e + f*x)**6 + 144*b**3*f*tan(e + f*x)**4 + 144*b**3*f*tan(e + f*x)**2 + 48*b**3*f)
+ 40*tan(e + f*x)**3/(48*b**3*f*tan(e + f*x)**6 + 144*b**3*f*tan(e + f*x)**4 + 144*b**3*f*tan(e + f*x)**2 + 4
8*b**3*f) + 33*tan(e + f*x)/(48*b**3*f*tan(e + f*x)**6 + 144*b**3*f*tan(e + f*x)**4 + 144*b**3*f*tan(e + f*x)*
*2 + 48*b**3*f), Eq(a, b)), (x/(a + b*tan(e)**2)**3, Eq(f, 0)), (16*a**4*f*x*sqrt(-a/b)/(16*a**7*f*sqrt(-a/b)
+ 32*a**6*b*f*sqrt(-a/b)*tan(e + f*x)**2 - 48*a**6*b*f*sqrt(-a/b) + 16*a**5*b**2*f*sqrt(-a/b)*tan(e + f*x)**4
- 96*a**5*b**2*f*sqrt(-a/b)*tan(e + f*x)**2 + 48*a**5*b**2*f*sqrt(-a/b) - 48*a**4*b**3*f*sqrt(-a/b)*tan(e + f*
x)**4 + 96*a**4*b**3*f*sqrt(-a/b)*tan(e + f*x)**2 - 16*a**4*b**3*f*sqrt(-a/b) + 48*a**3*b**4*f*sqrt(-a/b)*tan(
e + f*x)**4 - 32*a**3*b**4*f*sqrt(-a/b)*tan(e + f*x)**2 - 16*a**2*b**5*f*sqrt(-a/b)*tan(e + f*x)**4) - 15*a**4
*log(-sqrt(-a/b) + tan(e + f*x))/(16*a**7*f*sqrt(-a/b) + 32*a**6*b*f*sqrt(-a/b)*tan(e + f*x)**2 - 48*a**6*b*f*
sqrt(-a/b) + 16*a**5*b**2*f*sqrt(-a/b)*tan(e + f*x)**4 - 96*a**5*b**2*f*sqrt(-a/b)*tan(e + f*x)**2 + 48*a**5*b
**2*f*sqrt(-a/b) - 48*a**4*b**3*f*sqrt(-a/b)*tan(e + f*x)**4 + 96*a**4*b**3*f*sqrt(-a/b)*tan(e + f*x)**2 - 16*
a**4*b**3*f*sqrt(-a/b) + 48*a**3*b**4*f*sqrt(-a/b)*tan(e + f*x)**4 - 32*a**3*b**4*f*sqrt(-a/b)*tan(e + f*x)**2
- 16*a**2*b**5*f*sqrt(-a/b)*tan(e + f*x)**4) + 15*a**4*log(sqrt(-a/b) + tan(e + f*x))/(16*a**7*f*sqrt(-a/b) +
32*a**6*b*f*sqrt(-a/b)*tan(e + f*x)**2 - 48*a**6*b*f*sqrt(-a/b) + 16*a**5*b**2*f*sqrt(-a/b)*tan(e + f*x)**4 -
96*a**5*b**2*f*sqrt(-a/b)*tan(e + f*x)**2 + 48*a**5*b**2*f*sqrt(-a/b) - 48*a**4*b**3*f*sqrt(-a/b)*tan(e + f*x
)**4 + 96*a**4*b**3*f*sqrt(-a/b)*tan(e + f*x)**2 - 16*a**4*b**3*f*sqrt(-a/b) + 48*a**3*b**4*f*sqrt(-a/b)*tan(e
+ f*x)**4 - 32*a**3*b**4*f*sqrt(-a/b)*tan(e + f*x)**2 - 16*a**2*b**5*f*sqrt(-a/b)*tan(e + f*x)**4) + 32*a**3*
b*f*x*sqrt(-a/b)*tan(e + f*x)**2/(16*a**7*f*sqrt(-a/b) + 32*a**6*b*f*sqrt(-a/b)*tan(e + f*x)**2 - 48*a**6*b*f*
sqrt(-a/b) + 16*a**5*b**2*f*sqrt(-a/b)*tan(e + f*x)**4 - 96*a**5*b**2*f*sqrt(-a/b)*tan(e + f*x)**2 + 48*a**5*b
**2*f*sqrt(-a/b) - 48*a**4*b**3*f*sqrt(-a/b)*tan(e + f*x)**4 + 96*a**4*b**3*f*sqrt(-a/b)*tan(e + f*x)**2 - 16*
a**4*b**3*f*sqrt(-a/b) + 48*a**3*b**4*f*sqrt(-a/b)*tan(e + f*x)**4 - 32*a**3*b**4*f*sqrt(-a/b)*tan(e + f*x)**2
- 16*a**2*b**5*f*sqrt(-a/b)*tan(e + f*x)**4) - 18*a**3*b*sqrt(-a/b)*tan(e + f*x)/(16*a**7*f*sqrt(-a/b) + 32*a
**6*b*f*sqrt(-a/b)*tan(e + f*x)**2 - 48*a**6*b*f*sqrt(-a/b) + 16*a**5*b**2*f*sqrt(-a/b)*tan(e + f*x)**4 - 96*a
**5*b**2*f*sqrt(-a/b)*tan(e + f*x)**2 + 48*a**5*b**2*f*sqrt(-a/b) - 48*a**4*b**3*f*sqrt(-a/b)*tan(e + f*x)**4
+ 96*a**4*b**3*f*sqrt(-a/b)*tan(e + f*x)**2 - 16*a**4*b**3*f*sqrt(-a/b) + 48*a**3*b**4*f*sqrt(-a/b)*tan(e + f*
x)**4 - 32*a**3*b**4*f*sqrt(-a/b)*tan(e + f*x)**2 - 16*a**2*b**5*f*sqrt(-a/b)*tan(e + f*x)**4) - 30*a**3*b*log
(-sqrt(-a/b) + tan(e + f*x))*tan(e + f*x)**2/(16*a**7*f*sqrt(-a/b) + 32*a**6*b*f*sqrt(-a/b)*tan(e + f*x)**2 -
48*a**6*b*f*sqrt(-a/b) + 16*a**5*b**2*f*sqrt(-a/b)*tan(e + f*x)**4 - 96*a**5*b**2*f*sqrt(-a/b)*tan(e + f*x)**2
+ 48*a**5*b**2*f*sqrt(-a/b) - 48*a**4*b**3*f*sqrt(-a/b)*tan(e + f*x)**4 + 96*a**4*b**3*f*sqrt(-a/b)*tan(e + f
*x)**2 - 16*a**4*b**3*f*sqrt(-a/b) + 48*a**3*b**4*f*sqrt(-a/b)*tan(e + f*x)**4 - 32*a**3*b**4*f*sqrt(-a/b)*tan
(e + f*x)**2 - 16*a**2*b**5*f*sqrt(-a/b)*tan(e + f*x)**4) + 10*a**3*b*log(-sqrt(-a/b) + tan(e + f*x))/(16*a**7
*f*sqrt(-a/b) + 32*a**6*b*f*sqrt(-a/b)*tan(e + f*x)**2 - 48*a**6*b*f*sqrt(-a/b) + 16*a**5*b**2*f*sqrt(-a/b)*ta
n(e + f*x)**4 - 96*a**5*b**2*f*sqrt(-a/b)*tan(e + f*x)**2 + 48*a**5*b**2*f*sqrt(-a/b) - 48*a**4*b**3*f*sqrt(-a
/b)*tan(e + f*x)**4 + 96*a**4*b**3*f*sqrt(-a/b)*tan(e + f*x)**2 - 16*a**4*b**3*f*sqrt(-a/b) + 48*a**3*b**4*f*s
qrt(-a/b)*tan(e + f*x)**4 - 32*a**3*b**4*f*sqrt(-a/b)*tan(e + f*x)**2 - 16*a**2*b**5*f*sqrt(-a/b)*tan(e + f*x)
**4) + 30*a**3*b*log(sqrt(-a/b) + tan(e + f*x))*tan(e + f*x)**2/(16*a**7*f*sqrt(-a/b) + 32*a**6*b*f*sqrt(-a/b)
*tan(e + f*x)**2 - 48*a**6*b*f*sqrt(-a/b) + 16*a**5*b**2*f*sqrt(-a/b)*tan(e + f*x)**4 - 96*a**5*b**2*f*sqrt(-a
/b)*tan(e + f*x)**2 + 48*a**5*b**2*f*sqrt(-a/b) - 48*a**4*b**3*f*sqrt(-a/b)*tan(e + f*x)**4 + 96*a**4*b**3*f*s
qrt(-a/b)*tan(e + f*x)**2 - 16*a**4*b**3*f*sqrt(-a/b) + 48*a**3*b**4*f*sqrt(-a/b)*tan(e + f*x)**4 - 32*a**3*b*
*4*f*sqrt(-a/b)*tan(e + f*x)**2 - 16*a**2*b**5*...
________________________________________________________________________________________
Giac [A]
time = 0.65, size = 213, normalized size = 1.42 \begin {gather*} -\frac {\frac {{\left (15 \, a^{2} b - 10 \, a b^{2} + 3 \, b^{3}\right )} {\left (\pi \left \lfloor \frac {f x + e}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (b\right ) + \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {a b}}\right )\right )}}{{\left (a^{5} - 3 \, a^{4} b + 3 \, a^{3} b^{2} - a^{2} b^{3}\right )} \sqrt {a b}} - \frac {8 \, {\left (f x + e\right )}}{a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}} + \frac {7 \, a b^{2} \tan \left (f x + e\right )^{3} - 3 \, b^{3} \tan \left (f x + e\right )^{3} + 9 \, a^{2} b \tan \left (f x + e\right ) - 5 \, a b^{2} \tan \left (f x + e\right )}{{\left (a^{4} - 2 \, a^{3} b + a^{2} b^{2}\right )} {\left (b \tan \left (f x + e\right )^{2} + a\right )}^{2}}}{8 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(1/(a+b*tan(f*x+e)^2)^3,x, algorithm="giac")
[Out]
-1/8*((15*a^2*b - 10*a*b^2 + 3*b^3)*(pi*floor((f*x + e)/pi + 1/2)*sgn(b) + arctan(b*tan(f*x + e)/sqrt(a*b)))/(
(a^5 - 3*a^4*b + 3*a^3*b^2 - a^2*b^3)*sqrt(a*b)) - 8*(f*x + e)/(a^3 - 3*a^2*b + 3*a*b^2 - b^3) + (7*a*b^2*tan(
f*x + e)^3 - 3*b^3*tan(f*x + e)^3 + 9*a^2*b*tan(f*x + e) - 5*a*b^2*tan(f*x + e))/((a^4 - 2*a^3*b + a^2*b^2)*(b
*tan(f*x + e)^2 + a)^2))/f
________________________________________________________________________________________
Mupad [B]
time = 15.35, size = 2500, normalized size = 16.67 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
int(1/(a + b*tan(e + f*x)^2)^3,x)
[Out]
(atan((((-a^5*b)^(1/2)*((tan(e + f*x)*(9*b^7 - 60*a*b^6 + 190*a^2*b^5 - 300*a^3*b^4 + 289*a^4*b^3))/(32*(a^8 -
4*a^7*b + a^4*b^4 - 4*a^5*b^3 + 6*a^6*b^2)) - (((96*a^2*b^10 - 800*a^3*b^9 + 3040*a^4*b^8 - 6816*a^5*b^7 + 97
60*a^6*b^6 - 9056*a^7*b^5 + 5280*a^8*b^4 - 1760*a^9*b^3 + 256*a^10*b^2)/(64*(a^10 - 6*a^9*b + a^4*b^6 - 6*a^5*
b^5 + 15*a^6*b^4 - 20*a^7*b^3 + 15*a^8*b^2)) - (tan(e + f*x)*(-a^5*b)^(1/2)*(15*a^2 - 10*a*b + 3*b^2)*(256*a^4
*b^9 - 1280*a^5*b^8 + 2304*a^6*b^7 - 1280*a^7*b^6 - 1280*a^8*b^5 + 2304*a^9*b^4 - 1280*a^10*b^3 + 256*a^11*b^2
))/(512*(3*a^7*b - a^8 + a^5*b^3 - 3*a^6*b^2)*(a^8 - 4*a^7*b + a^4*b^4 - 4*a^5*b^3 + 6*a^6*b^2)))*(-a^5*b)^(1/
2)*(15*a^2 - 10*a*b + 3*b^2))/(16*(3*a^7*b - a^8 + a^5*b^3 - 3*a^6*b^2)))*(15*a^2 - 10*a*b + 3*b^2)*1i)/(16*(3
*a^7*b - a^8 + a^5*b^3 - 3*a^6*b^2)) + ((-a^5*b)^(1/2)*((tan(e + f*x)*(9*b^7 - 60*a*b^6 + 190*a^2*b^5 - 300*a^
3*b^4 + 289*a^4*b^3))/(32*(a^8 - 4*a^7*b + a^4*b^4 - 4*a^5*b^3 + 6*a^6*b^2)) + (((96*a^2*b^10 - 800*a^3*b^9 +
3040*a^4*b^8 - 6816*a^5*b^7 + 9760*a^6*b^6 - 9056*a^7*b^5 + 5280*a^8*b^4 - 1760*a^9*b^3 + 256*a^10*b^2)/(64*(a
^10 - 6*a^9*b + a^4*b^6 - 6*a^5*b^5 + 15*a^6*b^4 - 20*a^7*b^3 + 15*a^8*b^2)) + (tan(e + f*x)*(-a^5*b)^(1/2)*(1
5*a^2 - 10*a*b + 3*b^2)*(256*a^4*b^9 - 1280*a^5*b^8 + 2304*a^6*b^7 - 1280*a^7*b^6 - 1280*a^8*b^5 + 2304*a^9*b^
4 - 1280*a^10*b^3 + 256*a^11*b^2))/(512*(3*a^7*b - a^8 + a^5*b^3 - 3*a^6*b^2)*(a^8 - 4*a^7*b + a^4*b^4 - 4*a^5
*b^3 + 6*a^6*b^2)))*(-a^5*b)^(1/2)*(15*a^2 - 10*a*b + 3*b^2))/(16*(3*a^7*b - a^8 + a^5*b^3 - 3*a^6*b^2)))*(15*
a^2 - 10*a*b + 3*b^2)*1i)/(16*(3*a^7*b - a^8 + a^5*b^3 - 3*a^6*b^2)))/((51*a*b^5 - 9*b^6 - 115*a^2*b^4 + 105*a
^3*b^3)/(32*(a^10 - 6*a^9*b + a^4*b^6 - 6*a^5*b^5 + 15*a^6*b^4 - 20*a^7*b^3 + 15*a^8*b^2)) - ((-a^5*b)^(1/2)*(
(tan(e + f*x)*(9*b^7 - 60*a*b^6 + 190*a^2*b^5 - 300*a^3*b^4 + 289*a^4*b^3))/(32*(a^8 - 4*a^7*b + a^4*b^4 - 4*a
^5*b^3 + 6*a^6*b^2)) - (((96*a^2*b^10 - 800*a^3*b^9 + 3040*a^4*b^8 - 6816*a^5*b^7 + 9760*a^6*b^6 - 9056*a^7*b^
5 + 5280*a^8*b^4 - 1760*a^9*b^3 + 256*a^10*b^2)/(64*(a^10 - 6*a^9*b + a^4*b^6 - 6*a^5*b^5 + 15*a^6*b^4 - 20*a^
7*b^3 + 15*a^8*b^2)) - (tan(e + f*x)*(-a^5*b)^(1/2)*(15*a^2 - 10*a*b + 3*b^2)*(256*a^4*b^9 - 1280*a^5*b^8 + 23
04*a^6*b^7 - 1280*a^7*b^6 - 1280*a^8*b^5 + 2304*a^9*b^4 - 1280*a^10*b^3 + 256*a^11*b^2))/(512*(3*a^7*b - a^8 +
a^5*b^3 - 3*a^6*b^2)*(a^8 - 4*a^7*b + a^4*b^4 - 4*a^5*b^3 + 6*a^6*b^2)))*(-a^5*b)^(1/2)*(15*a^2 - 10*a*b + 3*
b^2))/(16*(3*a^7*b - a^8 + a^5*b^3 - 3*a^6*b^2)))*(15*a^2 - 10*a*b + 3*b^2))/(16*(3*a^7*b - a^8 + a^5*b^3 - 3*
a^6*b^2)) + ((-a^5*b)^(1/2)*((tan(e + f*x)*(9*b^7 - 60*a*b^6 + 190*a^2*b^5 - 300*a^3*b^4 + 289*a^4*b^3))/(32*(
a^8 - 4*a^7*b + a^4*b^4 - 4*a^5*b^3 + 6*a^6*b^2)) + (((96*a^2*b^10 - 800*a^3*b^9 + 3040*a^4*b^8 - 6816*a^5*b^7
+ 9760*a^6*b^6 - 9056*a^7*b^5 + 5280*a^8*b^4 - 1760*a^9*b^3 + 256*a^10*b^2)/(64*(a^10 - 6*a^9*b + a^4*b^6 - 6
*a^5*b^5 + 15*a^6*b^4 - 20*a^7*b^3 + 15*a^8*b^2)) + (tan(e + f*x)*(-a^5*b)^(1/2)*(15*a^2 - 10*a*b + 3*b^2)*(25
6*a^4*b^9 - 1280*a^5*b^8 + 2304*a^6*b^7 - 1280*a^7*b^6 - 1280*a^8*b^5 + 2304*a^9*b^4 - 1280*a^10*b^3 + 256*a^1
1*b^2))/(512*(3*a^7*b - a^8 + a^5*b^3 - 3*a^6*b^2)*(a^8 - 4*a^7*b + a^4*b^4 - 4*a^5*b^3 + 6*a^6*b^2)))*(-a^5*b
)^(1/2)*(15*a^2 - 10*a*b + 3*b^2))/(16*(3*a^7*b - a^8 + a^5*b^3 - 3*a^6*b^2)))*(15*a^2 - 10*a*b + 3*b^2))/(16*
(3*a^7*b - a^8 + a^5*b^3 - 3*a^6*b^2))))*(-a^5*b)^(1/2)*(15*a^2 - 10*a*b + 3*b^2)*1i)/(8*f*(3*a^7*b - a^8 + a^
5*b^3 - 3*a^6*b^2)) - ((tan(e + f*x)^3*(7*a*b^2 - 3*b^3))/(8*a^2*(a^2 - 2*a*b + b^2)) + (tan(e + f*x)*(9*a*b -
5*b^2))/(8*a*(a^2 - 2*a*b + b^2)))/(f*(a^2 + b^2*tan(e + f*x)^4 + 2*a*b*tan(e + f*x)^2)) - (2*atan((((((96*a^
2*b^10 - 800*a^3*b^9 + 3040*a^4*b^8 - 6816*a^5*b^7 + 9760*a^6*b^6 - 9056*a^7*b^5 + 5280*a^8*b^4 - 1760*a^9*b^3
+ 256*a^10*b^2)/(64*(a^10 - 6*a^9*b + a^4*b^6 - 6*a^5*b^5 + 15*a^6*b^4 - 20*a^7*b^3 + 15*a^8*b^2)) - (tan(e +
f*x)*(256*a^4*b^9 - 1280*a^5*b^8 + 2304*a^6*b^7 - 1280*a^7*b^6 - 1280*a^8*b^5 + 2304*a^9*b^4 - 1280*a^10*b^3
+ 256*a^11*b^2)*1i)/(32*(6*a*b^2 - 6*a^2*b + 2*a^3 - 2*b^3)*(a^8 - 4*a^7*b + a^4*b^4 - 4*a^5*b^3 + 6*a^6*b^2))
)*1i)/(6*a*b^2 - 6*a^2*b + 2*a^3 - 2*b^3) - (tan(e + f*x)*(9*b^7 - 60*a*b^6 + 190*a^2*b^5 - 300*a^3*b^4 + 289*
a^4*b^3))/(32*(a^8 - 4*a^7*b + a^4*b^4 - 4*a^5*b^3 + 6*a^6*b^2)))/(6*a*b^2 - 6*a^2*b + 2*a^3 - 2*b^3) - ((((96
*a^2*b^10 - 800*a^3*b^9 + 3040*a^4*b^8 - 6816*a^5*b^7 + 9760*a^6*b^6 - 9056*a^7*b^5 + 5280*a^8*b^4 - 1760*a^9*
b^3 + 256*a^10*b^2)/(64*(a^10 - 6*a^9*b + a^4*b^6 - 6*a^5*b^5 + 15*a^6*b^4 - 20*a^7*b^3 + 15*a^8*b^2)) + (tan(
e + f*x)*(256*a^4*b^9 - 1280*a^5*b^8 + 2304*a^6*b^7 - 1280*a^7*b^6 - 1280*a^8*b^5 + 2304*a^9*b^4 - 1280*a^10*b
^3 + 256*a^11*b^2)*1i)/(32*(6*a*b^2 - 6*a^2*b + 2*a^3 - 2*b^3)*(a^8 - 4*a^7*b + a^4*b^4 - 4*a^5*b^3 + 6*a^6*b^
2)))*1i)/(6*a*b^2 - 6*a^2*b + 2*a^3 - 2*b^3) + (tan(e + f*x)*(9*b^7 - 60*a*b^6 + 190*a^2*b^5 - 300*a^3*b^4 + 2
89*a^4*b^3))/(32*(a^8 - 4*a^7*b + a^4*b^4 - 4*a^5*b^3 + 6*a^6*b^2)))/(6*a*b^2 - 6*a^2*b + 2*a^3 - 2*b^3))/((51
*a*b^5 - 9*b^6 - 115*a^2*b^4 + 105*a^3*b^3)/(32...
________________________________________________________________________________________